package aop02;

import exception.UserExistException;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/3/8 9:10
 * Version:1.0-SNAPSHOT
 */
public class UserServiceImpl implements UserService {
    @Override
    public void login() {
        System.out.println("正在登陆");
    }

    @Override
    public void register() throws UserExistException {
        System.out.println("正在注册");
        throw new UserExistException("该用户已经被注册");
    }

    @Override
    public int add(int i, int j) {
        System.out.println("两个参数之和为:"+(i+j));
        return i+j;
    }
}
